package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.SchoolClassAggregateProp;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLManyQueryable;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLongTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class SchoolClassAggregatePropProxy extends AbstractProxyEntity<SchoolClassAggregatePropProxy, SchoolClassAggregateProp> {

    private static final Class<SchoolClassAggregateProp> entityClass = SchoolClassAggregateProp.class;

    public static final SchoolClassAggregatePropProxy TABLE = createTable().createEmpty();

    public static SchoolClassAggregatePropProxy createTable() {
        return new SchoolClassAggregatePropProxy();
    }

    public SchoolClassAggregatePropProxy() {
    }

    /**
     * {@link SchoolClassAggregateProp#getId}
     */
    public SQLStringTypeColumn<SchoolClassAggregatePropProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link SchoolClassAggregateProp#getName}
     */
    public SQLStringTypeColumn<SchoolClassAggregatePropProxy> name() {
        return getStringTypeColumn("name");
    }

    /**
     * 一对多 一个班级多个学生
     * {@link SchoolClassAggregateProp#getSchoolStudents}
     */
    public SQLManyQueryable<SchoolClassAggregatePropProxy, com.easy.query.test.entity.school.proxy.SchoolStudentProxy, com.easy.query.test.entity.school.SchoolStudent> schoolStudents() {
        return getNavigateMany("schoolStudents", new com.easy.query.test.entity.school.proxy.SchoolStudentProxy());
    }

    /**
     * {@link SchoolClassAggregateProp#getStudentSize}
     */
    public SQLLongTypeColumn<SchoolClassAggregatePropProxy> studentSize() {
        return getLongTypeColumn("studentSize");
    }


    @Override
    public Class<SchoolClassAggregateProp> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public SchoolClassAggregatePropProxyFetcher FETCHER = new SchoolClassAggregatePropProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class SchoolClassAggregatePropProxyFetcher extends AbstractFetcher<SchoolClassAggregatePropProxy, SchoolClassAggregateProp, SchoolClassAggregatePropProxyFetcher> {

        public SchoolClassAggregatePropProxyFetcher(SchoolClassAggregatePropProxy proxy, SchoolClassAggregatePropProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link SchoolClassAggregateProp#getId}
         */
        public SchoolClassAggregatePropProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link SchoolClassAggregateProp#getName}
         */
        public SchoolClassAggregatePropProxyFetcher name() {
            return add(getProxy().name());
        }

        /**
         * {@link SchoolClassAggregateProp#getStudentSize}
         */
        public SchoolClassAggregatePropProxyFetcher studentSize() {
            return add(getProxy().studentSize());
        }


        @Override
        protected SchoolClassAggregatePropProxyFetcher createFetcher(SchoolClassAggregatePropProxy cp, AbstractFetcher<SchoolClassAggregatePropProxy, SchoolClassAggregateProp, SchoolClassAggregatePropProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new SchoolClassAggregatePropProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
